package admrouter

import (
	"github.com/gin-gonic/gin"
	"yundian/internel/app/handlers/pcl/admin/memberhandler"
	"yundian/internel/app/handlers/pcl/admin/orderhandler"
	"yundian/internel/app/middlewares"
	"yundian/internel/pkg/dingo"
)

func InitOtherRouter() dingo.ApiRouter {
	return func(g *gin.RouterGroup) {
		{
			gpp := g.Group("gpp")
			gpp.POST("get-order-day-data-list", orderhandler.GetGppOrderDayDataList)     // 查询门店订单统计列表-天
			gpp.POST("get-order-month-data-list", orderhandler.GetGppOrderMonthDataList) // 查询门店订单统计列表-月

			gpp.Use(middlewares.JwtAuthMiddleware)
			gpp.POST("get-place-push-data-list", orderhandler.HandleGetPlacePushDataList)        // 查询推送数据
			gpp.POST("create-place-push-data", orderhandler.HandleCreateGppPlacePushDataInMonth) // 生成推送数据-按月份
			gpp.POST("send-place-push-data", orderhandler.HandleSendPlacePushData)               // 发送推送数据-按月份

			m := g.Group("member")
			m.Use(middlewares.JwtAuthMiddleware)                    // 需要登录
			m.GET("", memberhandler.GetMemberList)                  // 会员列表查询
			m.POST("change-state", memberhandler.HandleChangeState) // 更新会员状态
		}
	}
}
